package com.jn.erp.security.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jn.erp.security.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <pre>
 *
 * </pre>
 *
 * @author sunjiyong
 * @since 2024/8/28 15:43
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> getRolesByUser(Long userId);

    List<SysRole> getRolesByOrgUser(@Param("userId") Long userId,@Param("orgId") Long orgId);

    List<SysRole> selectRolePermissionByUserId(Long userId);

    List<SysRole> selectRolePermissionByOrgUser(@Param("userId") Long userId,@Param("orgId") Long orgId);

    List<SysRole> selectRoleList(SysRole sysRole);

    List<SysRole> selectRoleOrg(SysRole sysRole);

}
